package user_method;

import interface_method.AbstractPlayer;

import java.awt.Point;

import Resource_method.Resource;

public class UserTurn extends Thread
{
	private AbstractPlayer user;
	private Resource res;
	private int result;
	
	public UserTurn(AbstractPlayer user, Resource res)
	{
		this.user = user;
		this.res = res;
		result = -1;
	}
	public void run()
	{
		Point[] p = new Point[1];
		result = user.myTurn(res.getChessboard(), (Point[]) res
				.getAvailables().toArray(p), res.getSteps(), res
				.getLastMove());
	}
	
	public int getResult()
	{
		return result;		
	}
}
